package com.example.demo01.Controller.webController;

import com.alibaba.fastjson.JSON;
import com.example.demo01.Service.webService.UserStatisticsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class UserStatisticsInfoController {
    //自动装配
    @Autowired
    private UserStatisticsInfoService userStatisticsInfoService;

    //方法

    /**
     * 根据idnum获取基本统计信息
     */
    @RequestMapping("/userstatisticsinfo/byidnum")
    public String getUserStatisticsInfoByIdNum(
            @RequestParam("idnum") String idnum
    ) {
        return JSON.toJSONString(userStatisticsInfoService.getUserStatisticsInfoByIdNum(idnum));
    }

}
